import Home from '@/pages/Home'
import Login from '@/pages/Login'
import Error from "@/components/Error/Error"
import { createBrowserRouter,Navigate } from 'react-router-dom'

const router = createBrowserRouter([
    {
        path: '/home',
        element: <Home />,

    },
    {
        path: '/login',
        element: <Login />
    },
    {
        path: '/',
        element: <Navigate to='/login' replace/>
    },
    { 
        path: '*',
        element: <Error />
    }
])
export default router